Prevent box gadget content from being drawn twice
authorMatthias Clasen <mclasen@redhat.com>
Sat, 6 Aug 2016 23:33:47 +0000 (19:33 -0400)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 18 Oct 2016 10:49:12 +0000 (11:49 +0100)
Now that we split out box gadget children into separate
render nodes, we must not draw them onto the box gadgets
node anymore.

gtk/gtkboxgadget.c

index 3cc94da1dea51ecb84f8fe872a37e1ec778356ea..10bc0dff0bb5f70ceee9b59c8d4830b7724b17c5 100644 (file)
@@ -518,6 +518,12 @@ gtk_box_gadget_draw (GtkCssGadget *gadget,
   return FALSE;
 }
 
+static gboolean
+gtk_box_gadget_has_content (GtkCssGadget *gadget)
+{
+  return FALSE;
+}
+
 static void
 gtk_box_gadget_finalize (GObject *object)
 {
@@ -539,6 +545,7 @@ gtk_box_gadget_class_init (GtkBoxGadgetClass *klass)
   gadget_class->get_preferred_size = gtk_box_gadget_get_preferred_size;
   gadget_class->allocate = gtk_box_gadget_allocate;
   gadget_class->draw = gtk_box_gadget_draw;
+  gadget_class->has_content = gtk_box_gadget_has_content;
 }
 
 static void